<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>iterator</title>
</head>
<body>
<script type="text/javascript">
const test01 = [11, 12, 13];
const iterator01 = test01[Symbol.iterator]();
console.log(iterator01);
console.log(iterator01.next());//{value: 11, done: false}
console.log(iterator01.next());//{value: 12, done: false}
console.log(iterator01.next());//{value: 13, done: false}
console.log(iterator01.next());//{value: undefined, done: true}
</script>
<script type="text/javascript">
const test02 = 'abc';
const iterator02 = test02[Symbol.iterator]();
console.log(iterator02);
console.log(iterator02.next());//{value: "a", done: false}
console.log(iterator02.next());//{value: "b", done: false}
console.log(iterator02.next());//{value: "c", done: false}
console.log(iterator02.next());//{value: undefined, done: true}
</script>
</body>
</html>